import { Injectable } from '@nestjs/common';
import { Tenant } from '../entities/Tenant';
import { BaseService } from '@app/db/base/base.service';
import { InjectDataSource, InjectRepository } from '@nestjs/typeorm';
import { DataSource, Repository } from 'typeorm';

@Injectable()
export class TenantService extends BaseService<Tenant>{
    constructor(
        @InjectRepository(Tenant, 'common') protected repository:Repository<Tenant>,
        @InjectDataSource('common') protected readonly dataSource: DataSource
    ) {
        super()
        this.primaryKey = 'id'
    }
}
